From: Eli Zaretskii Date: Sun, 14 Aug 2011 11:10:19 +0000 (+0300) Subject: Fix bug #9296 with vertical cursor motion on images. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2598 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=dcf230fc4974d2445214d873475a743005691584;p=emacs.git Fix bug #9296 with vertical cursor motion on images. src/xdisp.c (move_it_in_display_line_to): Don't invoke IT_RESET_X_ASCENT_DESCENT when iterator position was restored from ppos_it. Fixes vertical cursor motion when line beginning is covered by an image. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3b752588f8d..2e7a818d22e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-08-14 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): Don't invoke + IT_RESET_X_ASCENT_DESCENT when iterator position was restored from + ppos_it. Fixes vertical cursor motion when line beginning is + covered by an image. (Bug#9296) + 2011-08-14 Jan Djärv * nsterm.h (ns_run_ascript): Declare. diff --git a/src/xdisp.c b/src/xdisp.c index a3bdcbdf4c6..ff3f55bef25 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8037,8 +8037,12 @@ move_it_in_display_line_to (struct it *it, if (!saw_smaller_pos && IT_CHARPOS (*it) > to_charpos) { if (IT_CHARPOS (ppos_it) < ZV) - RESTORE_IT (it, &ppos_it, ppos_data); - goto buffer_pos_reached; + { + RESTORE_IT (it, &ppos_it, ppos_data); + result = MOVE_POS_MATCH_OR_ZV; + } + else + goto buffer_pos_reached; } else if (it->line_wrap == WORD_WRAP && atpos_it.sp >= 0 && IT_CHARPOS (*it) > to_charpos)